<% include ../pageHeader %>
<div id="mainWrapper">
    <div id="content" class="content">
        <div id="innerContent">
            <div class="textbox">
                <div class="textbox-title"><h4><%= __('word_filter') %></h4></div>
                <div class="textbox-content">
                        <form method="post" action="?in=wordfilter">
                            <input name="_csrf" type="hidden" value="<%- ctx.csrf %>" />
                    <table border="0" cellpadding="3" cellspacing="2">
                            <tr>
                                <td class="listbox-header"></td>
                                <td class="listbox-header"><%= __('text') %>/<%= __('replace') %></td>
                                <td class="listbox-header"><%= __('regexp') %>/<%= __('mode') %></td>
                            </tr>
                            <% for(var i = 0;i < theCache.wordFilter.length;i++){
                                    with(theCache.wordFilter[i]){ %>
                                <tr>
                                    <td><input type="checkbox" name="selected" value="<%= id %>"/><input type="hidden"
                                                                                                         name="id"
                                                                                                         value="<%= id %>"/>
                                    </td>
                                    <td><input type="text" name="text" size="40" maxlength="50"
                                               value="<%= helper.HTMLEncodeLite(text) %>" class="text"/><br/>
                                        <input type="text" name="replace" size="40" maxlength="50"
                                               value="<%= helper.HTMLEncodeLite(replace) %>" class="text"/></td>
                                    <td>
                                        <%= __('regexp') %>:
                                        <input type="checkbox" name="regexp" value="<%= id %>"
                                                <% if(isRegExp)write(" checked=\"checked\"") %>
                                        />
                                        <br/>
                                        <%= __('mode') %>:
                                        <select name="mode">
                                            <option value="0"
                                                    <% if(mode == 0)write(" selected=\"selected\"") %>
                                            ><%= __('replace') %></option>
                                            <option value="1"
                                                    <% if(mode == 1)write(" selected=\"selected\"") %>
                                            ><%= __('block') %></option>
                                        </select>
                                    </td>
                                </tr>
                            <% }
                            }
                            %>
                            <tr>
                                <td><%= __('new') %>:<input type="hidden" name="id" value="0"/></td>
                                <td><input type="text" name="text" size="40" maxlength="50" value="" class="text"/><br/>
                                    <input type="text" name="replace" size="40" maxlength="50" value="" class="text"/>
                                </td>
                                <td>
                                    <%= __('regexp') %>:
                                    <input type="checkbox" name="newRegexp" value="0"/>
                                    <br/>
                                    <%= __('mode') %>:
                                    <select name="mode">
                                        <option value="0"><%= __('replace') %></option>
                                        <option value="1"><%= __('block') %></option>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="5">
                                    <br/>
                                    <select name="act">
                                        <option value="update"><%= __('save_change') %></option>
                                        <option value="delete"><%= __('delete_wordfilter') %></option>
                                    </select>
                                    <input type="submit" name="submit" value=" <%= __('execute') %> " class="button"/>
                                </td>
                            </tr>
                    </table>
                        </form>
                </div>
            </div>
        </div>
    </div>
    <% include adminSidebar %>
    <div class="clear"></div>
</div>

<% include ../pageFooter %>
